package chapter_23_stragtegy.classic;

/**
 * Created by CharloYao on 2017/9/29.
 * 上下文类，封装了IStrategy，并且把具体实现交给上层模块决定
 */
public class Context {
    private IStrategy iStrategy;

    public Context(IStrategy iStrategy) {
        this.iStrategy = iStrategy;
    }

    public void operation(){
        this.iStrategy.operation();
    }
}
